Farfalla Integrations: Customizable Authentication
Introduction
We simplify user authentication workflows by embedding customizable login forms that connect a tenant's platform to our authentication services. Users verify their credentials on an external server and seamlessly return to the store with a valid session.
After successful verification, we create a unique user identifier (UUID) and issue a JSON Web Token (JWT) for web sessions or an Access Token for mobile sessions. All forms are responsive, guaranteeing a consistent experience on desktop and mobile devices.
Integration Process
Each integration follows a common pattern:
- Tenant binding – Every integration belongs to a single tenant in our platform.
- JWT-based authentication – We use JWT to exchange secure credentials with our backend.
- Unique identification – The external platform provides an
external_idthat becomes the user's primary key in our ecosystem. - User creation or association – We create a new user or link an existing account based on the provided
external_id. - Credential validation – The external platform validates the user; we only issue tokens once the external server confirms authentication.
- Iframe communication – The entire integration runs inside an
iframe. The page hosting the iframe receives updates viapostMessageand can hide or replace the default login widget once authentication succeeds.
Definition and Services
To add a new integration you must configure two building blocks:
- View layer – A user-facing form that collects credentials. We can ship this form or embed a third-party form provided by the tenant.
- Services – Backend classes that validate credentials against the external system and sign users into our platform.